from ant import Ant
import threading,Queue,time,os
class localer(threading.Thread,Ant):
	pile = Queue.Queue(5)
	def run(self):
		while True:
			twig = localer.pile.get()
			if("g" in Ant.__commandstring__ and "a" not in Ant.__commandstring__):
                            Ant.leave("localer")
                            working_result_of_localer=self.fetch(twig)
                            if(working_result_of_localer==""):
				retriever.pile.put(twig)
			    Ant.comehome("localer")
			else:
                            retriever.pile.put(twig)
                        localer.pile.task_done()
	def fetch(self,info):
                self.artist=info[1]
